#include "../AtlTest/AtlTest_i.h"
#include <Windows.h>

int main()
{
    HRESULT hResult;
    IAtlObject* lpIAtlObject = nullptr;

    CoInitialize(0);

    do
    {
        hResult = CoCreateInstance(CLSID_AtlObject, nullptr, CLSCTX_INPROC_SERVER, 
            IID_IAtlObject, (void**)&lpIAtlObject);
        if (hResult != S_OK) break;

        lpIAtlObject->Test();

    } while (FALSE);

    if (lpIAtlObject)
        lpIAtlObject->Release();

    CoUninitialize();

    return 0;
}